﻿using Utilities.Entity;

namespace ViewModel.Response
{
    public class ResponseModel<T> where T : class
    {

        public ResponseStatus Status { get; set; } = ResponseStatus.Fail;
        private string message;

        public string Message
        {
            get
            {
                if (string.IsNullOrEmpty(message))
                {
                    message = Status.GetEnumDescription();
                }
                return message;
            }
            set
            {
                if (string.IsNullOrEmpty(value))
                {
                    message = Status.GetEnumDescription();
                }
                else
                {
                    message = value;
                }
            }
        }
        public T Data { get; set; }
    }
}
